package com.yanqu.road.server.cmd.unionwar;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.unionwar.CrossUnionWarProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.unionwar.CrossUnionWarMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_UNION_WAR_DETAIL_SYNC, desc = "商会战详细信息同步")
public class CrossUnionWarDetailSyncCmd extends CrossUnionCommand {

    private CrossUnionWarProto.CrossUnionWarDetailSyncMsg reqMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = CrossUnionWarProto.CrossUnionWarDetailSyncMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossUnionWarMgr.updateUnionWarDetail(serverId, reqMsg);
    }

    @Override
    public void sendData() {

    }
}
